package com.xzan.medusa.common.enums;

/**
 * app接受的code只有如下几种（由阿道提供）：
 *  1：成功
 *  2：session过期
 *  3：业务报错
 *  8：用户未注册
 *  9：账号异常
 *  101：sessionId无效
 * @author mahe
 * @date 2016/12/15
 */
public enum AppErrorCodeEnum {
    SESSION_EXPIRE("2","用户登录session已过期，请重新登录"),
    SUCCESS("1", "成功"),
    NO_DATA("3", "无数据"),
    PARAM_ERROR("1003", "参数错误"),
    INSERT_FAIL("1004", "插入数据错误"),
    QUERY_FAIL("1005", "查询错误"),
    UPDATE_FAIL("1006", "修改数据错误"),
    DATA_ERROR("1008", "数据异常"),
    DUPLICATE_ERROR("1009", "重复操作"),
    NO_AUTH("1010", "没有权限,请联系@婷姐进行授权"),
    UPLOAD_ERROR("1011", "文件上传失败"),
    SIGN_ERROR("1012", "esign 签章失败"),
    SEND_SIGNCODE_ERROR("1013", "发送esign验证码失败"),
    INIT_ESIGN_ERROR("1014", "初始化esign开发者账号错误"),
    LOGIN_ESIGN_ERROR("1015", "登陆esign错误"),
    CREATE_ACCOUNT_ERROR("1016", "创建esign账号错误"),
    CREATE_SEAL_ERROR("1017", "创建印章错误"),
    INVALID_LOANORDER("1018", "异常的订单宝"),
    WRONG_SIGNCODE("1019", "错误的验证码"),
    EMPTY_USER("1020", "获取用户为空"),
    DING_DING_USER_ERROR("1021", "获取钉钉用户信息错误"),
    CHECK_ADMIN_ERROR("1022", "校验用户信息失败"),
    USER_NOT_EXISTS("1023", "用户不存在"),
    PARTNER_NOT_EXISTS("1024", "商家不存在"),
    MATCH_CAR_ERROR("1025", "查询车辆信息失败"),
    MATCH_COLOR_ERROR("1026", "匹配颜色信息失败"),
    MATCH_PRICE_ERROR("1027", "匹配价格失败"),
    MATCH_FRAME_NO_ERROR("1028", "匹配车架号失败"),
    USER_NAME_PASSWORD_ERROR("1029", "用户名或密码错误"),
    NO_AUTHORIZED("1030", "用户未被授权"),
    NO_FUNCTION_ERROR("1031", "查询无任何功能"),
    NO_ROLE_ERROR("1032", "该用户无任何角色"),
    HAS_NO_TREATED_CAR("1033", "有未处理的车源"),
    UPPERLIMIT("1034", "报名数量超过5个了"),
    CERT_CHECK_EMPTY_ERROR("1035", "查询用户的check信息为空"),
    PUSH_ERROR("1036", "发送通知失败"),
    SMS_CODE_REQ_TO_MUCH("1037", "短信验证码请求过于频繁，请稍后再试。"),
    INVALID_PHONE_NO("1038", "无效的手机号或者手机号码为空"),

    WAREHOUSE_CLOSE_ERROR("2001", "该仓库尚有车辆,不能进行关闭操作"),
    UPLOAD_IMAGE_FAIL("2002", "图片上传失败"),
    NO_TRANSPORT_ORDER("2003", "运单不存在"),
    NOT_THIS_USER_TRANSPORT_ORDER("2004","不是您的运单，您无法进行支付"),
    PENDING_PAYMENT_TRANSPORT_ORDER("2005","只有待支付的运单才能进行支付"),
    CREATE_PAY_ERROR("2006","生成支付信息异常"),
    INVOKE_REMOTE_LEXUS_SERVICE_ERROR("2007","lexus的dubbo接口调用异常"),
    NO_CAR_EXAM_IMG("2008","没有验车照片"),
    NO_CAR_INSURANCE_IMG("2009","没有保单照片"),
    NO_CAR_IN_TRANSIT_RECORD("2010","没有在途信息"),
    NO_CAR_TYPE("2011","没有查询出车辆类型"),
    NO_CARRIER("2012","没有此承运商信息"),
    CREATE_TRANSPORT_ORDER_ERROR("2013","生成运单失败"),
    QUERY_TRANSPORT_ORDER_CAR_ERROR("2014","运单下没有车辆，运单已被删除"),
    EXPIRE_USER_LOGIN("2015","用户登录session过期，请重新登录"),
    SAVE_EXAM_IMG_ERROR("2016","保存验车照片异常"),
    SAVE_POLICY_IMG_ERROR("2017","保存保单异常"),
    SHIP_ERROR("2018","提车异常"),
    ARRIVE_ERROR("2019","到达异常"),
    TRANSPORT_ORDER_ERROR("2020","该运单存在异常"),
    ROUTE_TRANSPORT_TIME_ERROR("2021","路线的运输时间异常"),
    SAVE_ONROAD_ERROR("2022","保存在途信息异常"),
    SAVE_DELIVERY_IMG_ERROR("2023","保存交车单异常"),
    //承运商暂停也返回这个状态码，用于前端的操作判断依据
    ROUTE_CLOSED_ERROR("2024","抱歉，承运商刚刚暂停了该路线的业务，请您重新选择。"),
    TRANSPORT_CAR_NOT_EXISTS("2025", "车辆不存在"),
    NOT_MATCH_CARRIER("2026", "未查询到承运商"),
    TRANSPORT_CAR_STATUS_NOT_IDENTICAL("2027", "车辆状态不一致"),
    TRANSPORT_VEHICLE_NOT_FOUND("2028", "未查询到运输车辆"),
    EXIST_CAR_COULD_NOT_DISTRIBUTE_PLEASE_RETRY("2029", "部分车辆状态不能进行该批量操作，请核对车辆状态"),
    EXIST_CAR_COULD_NOT_SHIP_PLEASE_RETRY("2030", "存在不符合提车条件的车辆，请处理后重试"),
    NOT_FOUNT_TRANSPORT_RECORD("2031","没有找到运输记录信息"),
    PLEASE_EDIT_VEHICLE_INFO_FIRST("2032", "请先维护运输车辆车牌号、司机姓名、司机电话"),
    NOT_EXIST_MATCHED_BEST_ROUTE("2033", "未匹配到报价最佳路线"),
    CITY_TRANSPORTATION_IS_RECOMMENDED_RESCUE_VEHICLE("2034", "同城运输推荐选择救援车"),
    NOT_EXIST_VEHICLE_BINDING_ORDER("2035","该运车没有绑定到运单"),
    CANT_FIND_TRANSPORT_ORDER_BY_ORDER_NO("2035", "根据运单编号没有找到对应的运单信息"),
    NOT_EXIST_V3_ROUTE("2036", "未找到V3报价路线"),
    LOGISTICS_NOT_ARRIVE("2037", "该运单无法操作到达,需公司后台调度操作到达"),


    // 运单相关的错误枚举名称以ORDER_开头，错误码从30xx开始
    ORDER_DETAIL_QUERY_FAILED("3001", "运单详情查询失败"),
    EXCEPTION("9999", "系统异常"),
    BIZ_EXCEPTION("8888", "业务异常");

    private String errMsg;
    private String errCode;

    private AppErrorCodeEnum(String errCode, String errMsg) {
        this.errMsg = errMsg;
        this.errCode = errCode;
    }

    public String getErrMsg() {
        return this.errMsg;
    }

    public String getErrCode() {
        return this.errCode;
    }
}
